package com.hzlx.mesMaterialTransactions.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hzlx.mesMaterialTransactions.mapper.MesMaterialTransactionsMapper;
import com.hzlx.mesMaterialTransactions.domain.MesMaterialTransactions;
import com.hzlx.mesMaterialTransactions.service.IMesMaterialTransactionsService;

/**
 * MES 物料交易，记录物料入库、出库等交易全流程信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-01
 */
@Service
public class MesMaterialTransactionsServiceImpl implements IMesMaterialTransactionsService 
{
    @Autowired
    private MesMaterialTransactionsMapper mesMaterialTransactionsMapper;

    /**
     * 查询MES 物料交易，记录物料入库、出库等交易全流程信息
     * 
     * @param transactionId MES 物料交易，记录物料入库、出库等交易全流程信息主键
     * @return MES 物料交易，记录物料入库、出库等交易全流程信息
     */
    @Override
    public MesMaterialTransactions selectMesMaterialTransactionsByTransactionId(Long transactionId)
    {
        return mesMaterialTransactionsMapper.selectMesMaterialTransactionsByTransactionId(transactionId);
    }

    /**
     * 查询MES 物料交易，记录物料入库、出库等交易全流程信息列表
     * 
     * @param mesMaterialTransactions MES 物料交易，记录物料入库、出库等交易全流程信息
     * @return MES 物料交易，记录物料入库、出库等交易全流程信息
     */
    @Override
    public List<MesMaterialTransactions> selectMesMaterialTransactionsList(MesMaterialTransactions mesMaterialTransactions)
    {
        return mesMaterialTransactionsMapper.selectMesMaterialTransactionsList(mesMaterialTransactions);
    }

    /**
     * 新增MES 物料交易，记录物料入库、出库等交易全流程信息
     * 
     * @param mesMaterialTransactions MES 物料交易，记录物料入库、出库等交易全流程信息
     * @return 结果
     */
    @Override
    public int insertMesMaterialTransactions(MesMaterialTransactions mesMaterialTransactions)
    {
        return mesMaterialTransactionsMapper.insertMesMaterialTransactions(mesMaterialTransactions);
    }

    /**
     * 修改MES 物料交易，记录物料入库、出库等交易全流程信息
     * 
     * @param mesMaterialTransactions MES 物料交易，记录物料入库、出库等交易全流程信息
     * @return 结果
     */
    @Override
    public int updateMesMaterialTransactions(MesMaterialTransactions mesMaterialTransactions)
    {
        return mesMaterialTransactionsMapper.updateMesMaterialTransactions(mesMaterialTransactions);
    }

    /**
     * 批量删除MES 物料交易，记录物料入库、出库等交易全流程信息
     * 
     * @param transactionIds 需要删除的MES 物料交易，记录物料入库、出库等交易全流程信息主键
     * @return 结果
     */
    @Override
    public int deleteMesMaterialTransactionsByTransactionIds(Long[] transactionIds)
    {
        return mesMaterialTransactionsMapper.deleteMesMaterialTransactionsByTransactionIds(transactionIds);
    }

    /**
     * 删除MES 物料交易，记录物料入库、出库等交易全流程信息信息
     * 
     * @param transactionId MES 物料交易，记录物料入库、出库等交易全流程信息主键
     * @return 结果
     */
    @Override
    public int deleteMesMaterialTransactionsByTransactionId(Long transactionId)
    {
        return mesMaterialTransactionsMapper.deleteMesMaterialTransactionsByTransactionId(transactionId);
    }
}
